home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8"?>
- <html><head><title>FindObject Function [Runtime]</title><meta name="filename" content="text/sbasic/common/03103800"/><meta name="language" content="en-US"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
-
- p.P1{
- }
- span.T1{
- font-weight:bold;}
- </style></head><body>
-
-
- <p class="P1"/>
- <p class="Head1"><a name="findobject"/><help:link Id="66445" xmlns:help="http://openoffice.org/2000/help">FindObject Function [Runtime]</help:link></p>
- <p class="Paragraph">Enables objects to be addressed at run-time as a string parameter via the object name.<a name="ende"/></p>
- <p class="Paragraph">For instance, the following command:</p>
- <p class="Paragraph">MyObj.Prop1.Command = 5</p>
- <p class="Paragraph">corresponds to the command block:</p>
- <p class="Paragraph">Dim ObjVar as Object</p>
- <p class="Paragraph">Dim ObjProp as Object</p>
- <p class="Paragraph">ObjName As String = "MyObj"</p>
- <p class="Paragraph">ObjVar = FindObject( ObjName As String )</p>
- <p class="Paragraph">PropName As String = "Prop1"</p>
- <p class="Paragraph">ObjProp = FindPropertyObject( ObjVar, PropName As String )</p>
- <p class="Paragraph">ObjProp.Command = 5</p>
- <p class="Paragraph">This allows names to be created dynamically at run-time, for example, you could use</p>
- <p class="Paragraph">"TextEdit1" to TextEdit5" in a loop to create five control names.</p>
- <p class="Paragraph">See also: <help:link Id="66405" Eid="findpropertyobject" xmlns:help="http://openoffice.org/2000/help">FindPropertyObject</help:link></p>
- <p class="Paragraph"><span class="T1">Syntax</span>:</p>
- <p class="Paragraph">FindObject( ObjName As String ) <help:key-word value="FindObject" tag="kw66445_1" xmlns:help="http://openoffice.org/2000/help"/></p>
- <p class="Paragraph"><span class="T1">Parameter</span>:</p>
- <p class="Paragraph">ObjName: String that specifies the name of the object to be addressed at run-time.</p>
- </body></html>